#include <stdio.h>
#include <string.h>

#define LEN 40

int main(void)
{
    int count;
    char words[LEN];

    printf("Enter a word: ");
    scanf("%s", words);

    count = strlen(words);

    for (int i = count - 1; i >= 0; i--)
        printf("%c", words[i]);
    
    return 0;
}